var swapPairs = function(head){
  let dummy = new listNode();
  let currency = dummy;
  dummy.next = head
  while(dummy.next !== null && dummy.next.next != null){
    
    let n1 = currency.next;
    let n2 = currency.next.next;
    currency.next = n2;
    n1.next = n2.next
    n2.next = n1;
    currency = n1;
    
  }
  return dummy.next
}